<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<html>
<head>
    <title>验证跨域请求</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.min.js"></script>
</head>
<body>
<button id="btn">跨域请求9090服务的数据</button>

<script>
    $(function () {
        $("#btn").click(function () {
            $.ajax({
                url: "http://localhost:9090/users",
                contentType: "application/json",
                method: "get",
                success: function (res) {
                    console.log(res);
                }
            });
        });
    });
</script>
</body>
</html>
